<template>
  <el-card class="box-card" shadow="never">
    <div slot="header">
      <span>🥂 推广</span>
    </div>
    <div>
      <span v-for="(item, index) in List" :key="index" class="mr-5">
        <el-tag type="warning">
            <a :href="item.link" target="_blank">{{ item.title }}</a> 
        </el-tag>
      </span>
    </div>
  </el-card>
</template>

<script>
import { getAll } from "@/api/promotion"

export default {
    name: "Promotion",

    data() {
        return {
          List: []
        };
    },
    created() {
      this.fetchAll()
    },
    methods: {
      fetchAll() {
        getAll().then(requese => {
          const { data } = requese;
          this.List = data;
        });
      },
    },
};
</script>

<style scoped>
</style>
